package com.ztmg.water.service.wx.impl;

import com.ztmg.common.constant.CommonConstants;
import com.ztmg.common.util.handleSign.SignUtils;
import com.ztmg.common.util.handleSign.SignUtilsImpl;
import com.ztmg.common.util.resultUtils.JsonResult;
import com.ztmg.water.service.wx.WXService;
import org.springframework.stereotype.Service;

@Service
public class WXServiceImpl implements WXService {

    @Override
    public JsonResult getSign(String content) {
        SignUtils signUtils = new SignUtilsImpl();
        String abc=signUtils.encrypt(content,CommonConstants.PAY_DES_KEY,"DESede");
        String sign = signUtils.sign(abc, CommonConstants.PRIVATE_KEY, CommonConstants.KEY_TYPE);
        return JsonResult.success(sign);
    }
}
